<?php

namespace Admin\Model;
use Think\Model;
use Common\Common\ConstantUtil;

class ModulesModel extends Model
{

    protected $tableName = 'modules';

    public function upDelete($modules_id){

        if(empty($modules_id)) return false;
        if(!is_array($modules_id)) $modules_id = [$modules_id];
        M("modules")->where(["id"=>["IN",$modules_id]])->save(["status"=>ConstantUtil::GLOBAL_FALSE]);
        M("modules_func")->where(["modules_id"=>["IN",$modules_id]])->save(["status"=>ConstantUtil::GLOBAL_FALSE]);
        return true;
    }

}
